<%@page isELIgnored="false" import="java.net.*" %>
<%@taglib prefix="tiles" uri="struts-tiles" %>
<%@taglib prefix="html" uri="struts-html" %>
<%@taglib prefix="c" uri="jstl" %>
<%@taglib prefix="mcfn" uri="mcfn" %>
<%@taglib prefix="fn" uri="jstl-fn" %>
					<div id="bodyContent">
						<h1>Assets</h1>
						<div class='errors'><html:errors/>${UserLogin.messageError}</div><br/>
						<br/>
<c:set value="${fn:length(Assets)}" var="AssetsLength" />
<c:choose>
<c:when test="${AssetsLength eq 0}">
						<center>No records</center>
</c:when>
<c:otherwise>
						<table class="tabDatos">
							<thead>
								<tr>
									<th>Name</th>
									<th>Category</th>
									<th>Subcategory</th>
									<th>Event Date</th>
									<th></th>
								</tr>
							</thead>
            
<c:forEach items="${postAssets}" var="assett" varStatus="assetStatuss"> 
    
							<tr onmouseover="this.style.background='lightgray';" onmouseout="this.style.background='white';">
								<td onclick="javascript: document.getElementById('FormEditar-${assett.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${assett.nombre}</td>
								<td onclick="javascript: document.getElementById('FormEditar-${assett.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${assett.tblSubcateg.tblCategoria.nombre}</td>
								<td onclick="javascript: document.getElementById('FormEditar-${assett.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${assett.tblSubcateg.nombre}</td>
								<td onclick="javascript: document.getElementById('FormEditar-${assett.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${mcfn:formatDate(assett.fecha,'dd/MM/yyyy')}</td>
								<td align="right">
									<table border='0'>
										<tr>
											<td>
												<html:form action='/AssetsModificarPaquetes' method='post'>
													<html:hidden property="cveAsset" value="${assett.cveAsset}"/>
													<html:image src="images/btnPaquetes.gif" title="Paquetes" />
												</html:form>
											</td>
										</tr>
									</table>
									
								</td>
							</tr>
</c:forEach>
                                                                                                        
<c:forEach items="${antAssets}" var="Aasset" varStatus="AassetStatus"> 
    
							<tr onmouseout="this.style.background='lightgray';" onmouseover="this.style.background='white';">
								<td onclick="javascript: document.getElementById('FormEditar-${Aasset.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${Aasset.nombre}</td>
								<td onclick="javascript: document.getElementById('FormEditar-${Aasset.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${Aasset.tblSubcateg.tblCategoria.nombre}</td>
								<td onclick="javascript: document.getElementById('FormEditar-${Aasset.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${Aasset.tblSubcateg.nombre}</td>
								<td onclick="javascript: document.getElementById('FormEditar-${Aasset.cveAsset}').submit( );" onmouseover="javascript: this.style.cursor='pointer';" onmouseover="javascript: this.style.cursor='default';">${mcfn:formatDate(Aasset.fecha,'dd/MM/yyyy')}</td>
								<td align="right">
									<table border='0'>
										<tr>                                                                                        
											<td>
												<html:form action='/AssetsAsignacionPaquetesPreparacionBDMTitular' method='post'>
													<html:hidden property="asset" value="${Aasset.cveAsset}"/>
													<html:image src="images/btnPaquetes.gif" title="Paquetes" />
												</html:form>
											</td>
										</tr>
									</table>
									
								</td>
							</tr>
</c:forEach>
                                                                                                        
						</table>
</c:otherwise>
</c:choose>
					</div>
					<div id="footContent"></div>
